package com.kyivmohyla.kma2.client.view.manager;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.inject.Inject;
import com.kyivmohyla.kma2.client.presenter.manager.ManagerOpenClosedOrdersPresenter;
import com.kyivmohyla.kma2.client.view.common.OrderCellTableWidget;

public class ManagerClosedOrdersView extends Composite implements ManagerOpenClosedOrdersPresenter.Display {
    private static ManagerClosedOrdersViewUiBinder ourUiBinder = GWT.create(ManagerClosedOrdersViewUiBinder.class);

    @UiField
    protected Button back;

    @UiField
    protected OrderCellTableWidget orderCellTable;

    @Inject
    public ManagerClosedOrdersView() {
        initWidget(ourUiBinder.createAndBindUi(this));
    }

    @Override
    public OrderCellTableWidget getOrderCellTable() {
        return orderCellTable;
    }

    @Override
    public HasClickHandlers getBackButton() {
        return back;
    }

    public Widget asWidget() {
        return this;
    }

    interface ManagerClosedOrdersViewUiBinder extends UiBinder<HTMLPanel, ManagerClosedOrdersView> {
    }
}